package com.linkage.usercenter.dao;

import com.linkage.usercenter.pojo.entity.CorePersonInfo;
import com.linkage.usercenter.pojo.vo.UserMgInfoVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CorePersonInfoMapper {
    int deleteByPrimaryKey(Integer id);
    int deleteByPersonCode(@Param("personCode") String personCode);

    int insert(CorePersonInfo record);

    int insertSelective(CorePersonInfo record);

    CorePersonInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(CorePersonInfo record);

    int updateByPrimaryKey(CorePersonInfo record);


    int getCountByUserCode(@Param("userCode") String userCode, @Param("mobile") String mobile);

    CorePersonInfo getRecordByPersonCode(String personCode);

    CorePersonInfo getRecordByPersonCodeAndMobile(@Param("personCode") String personCode, @Param("mobile") String mobile);

    CorePersonInfo getPersonInfoByCardNumber(String personCardNumber);

    int getRecordNumByCardNumber(String personCardNumber);

    CorePersonInfo getRecordByPersonCardNumber(String personCardNumber);

    String getOrgCodeByMobile(String userMobile);

    List<CorePersonInfo> getRecordByDptCode(@Param("dptCode") String dptCode,@Param("userName")String userName);

    List<CorePersonInfo> getRecordByDptCodeAndUser(@Param("dptCode") String dptCode, @Param("personName") String userName);

    List<CorePersonInfo> getRecordByCrtCode(String userCode);

    int updatePersonJobFlag(@Param("personCode") String personCode, @Param("personJobFlag") String personJobFlag);

    Integer getCount(CorePersonInfo personInfo);

    CorePersonInfo getRecordByUserCode(String userCode);

    List<CorePersonInfo> getRecordByDptAndClass(CorePersonInfo corePersonInfo);

    List<CorePersonInfo> getAllRecords();

    void deleteByDptCode(String dptCode);

    void updatePersonPhoneFlag(@Param("mobile") String mobile, @Param("phoneFlag") String phoneFlag);

    List<String> getMobilesByPhoneFlag();
}